#include "button_share.h"
#include "ui_button_share.h"

Button_share::Button_share(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::Button_share)
{
    ui->setupUi(this);

    setStyleSheet("background-color: #e02828;border-bottom-left-radius: 5px;border-bottom-right-radius: 5px;");
    QFont f;
    f.setPointSize(6);
    ui->ShareTitle->setFont(f);
}

Button_share::~Button_share()
{
    delete ui;
}

void Button_share::enterEvent(QEvent *)
{
    btnstatus = !btnstatus;
    if (btnstatus) {
        ui->ShareBtn->setStyleSheet("image: url(:/new/icon/image/icon_down.png);");
    }else {
        ui->ShareBtn->setStyleSheet("image: url(:/new/icon/image/icon_up.png);");
    }
    emit mySignal();
}

void Button_share::leaveEvent(QEvent *)
{

}
